import { Swiper, SwiperSlide } from 'vue-awesome-swiper'
import BScroll from '@better-scroll/core'
import Vue from 'vue'
import tabs from '../../components/tabs/index.vue'
import headss from '../../components/header/index.vue'
let vm = null
export default {
  data() {
    return {	
      actives:0,
      // tabbar切换 
			  swiperOption: {
        spaceBetween: 30,
        pagination: {
				  el: '.swiper-pagination',
				  clickable: true
        },
        on: {
          slideChangeTransitionEnd: function(){
            //   alert(this.activeIndex);
            vm.actives = this.activeIndex // 切换结束时，告诉我现在是第几个slide
          }
        }
			  },
			  // 里面的滚动
			  swiperOptions: {
        // slidesPerView: 3,
        // spaceBetween: 30,
        slidesPerView: 'auto',
        touchMoveStopPropagation :true,
        freeMode: true,
        pagination: {
				  el: '.swiper-pagination',
				  clickable: true
        }
			  },
			  swiperOptionone: {
        direction: 'vertical',
        slidesPerView: 'auto',
        freeMode: true,
        scrollbar: {
				  el: '.swiper-scrollbar'
        },
        mousewheel: true
			  },
			  info:[{
        imageName: 'https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61a8af0c1f655f0011bb51f4/61c94cba1158630011a4e26c/16406543498417820223.png',
        name: '王小样',
        desc: '不拉多尔-泡芙',
        data: '1分钟前',
        sel: '289',
        sec: '36',
        set: '14',
        info: '狗狗是人类的最好的朋友，它们忠诚可靠，守护着他们的主人不离不弃。甚至，比生命更为重要。',
        imglist: [{
          img: 'https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61a8af0c1f655f0011bb51f4/61c94cba1158630011a4e26c/16406543502929257209.png'
        }, {
          img: 'https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61a8af0c1f655f0011bb51f4/61c94cba1158630011a4e26c/16406543504173470534.png'
        }, {
          img: 'https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61a8af0c1f655f0011bb51f4/61c94cba1158630011a4e26c/16406543504173470534.png'
        }, {
          img: 'https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61a8af0c1f655f0011bb51f4/61c94cba1158630011a4e26c/16406543505302737517.png'
        }]
      },{
        imageName: 'https://lanhu.oss-cn-beijing.aliyuncs.com/pscb9yh4h7pufok8wnntl2viyiq7jgiynvc01f9700-a5ef-4024-ace8-4c90e61f45ab',
        name: '喵喵大人',
        desc: '不拉多尔-泡芙',
        data: '1分钟前',
        sel: '289',
        sec: '36',
        set: '14',
        info: '狗狗是人类的最好的朋友，它们忠诚可靠，守护着他们的主人不离不弃。甚至，比生命更为重要。',
        imglist: [{
          img: 'https://lanhu.oss-cn-beijing.aliyuncs.com/psy8ezw1rmdiqe8uxgbt7xuncp6atpr3is45405e268-f438-4b35-b51d-0ebec66f646a'
        }, {
          img: 'https://lanhu.oss-cn-beijing.aliyuncs.com/pstox60ikvh1bvytcoeqd1cbs5zw6yw84ad28cb0e-bde4-4d90-94b9-93fa4f5e52c9'
        }, {
          img: 'https://lanhu.oss-cn-beijing.aliyuncs.com/pstox60ikvh1bvytcoeqd1cbs5zw6yw84ad28cb0e-bde4-4d90-94b9-93fa4f5e52c9'
        }, {
          img: 'https://lanhu.oss-cn-beijing.aliyuncs.com/pstox60ikvh1bvytcoeqd1cbs5zw6yw84ad28cb0e-bde4-4d90-94b9-93fa4f5e52c9'
        }]
      }],
			  list:[{
				  name:'关注'				
			  },{
        name:'推荐'				
      }],
			  active: 0,
			  loopData0: [
        {
				  lanhuimage0:
					'https://lanhu.oss-cn-beijing.aliyuncs.com/ps1cnzy9sezu5pnicc4v5945sgetnk9khb381347b6-41b3-4a25-a07f-fedfcefd5afd'
        },
        {
				  lanhuimage0:
					'https://lanhu.oss-cn-beijing.aliyuncs.com/psq5iin3hbnfpufmylglhicz56tr9dm5yh473f2df2-a197-41ee-8042-dc6fc1d51fbb'
        },
        {
				  lanhuimage0:
					'https://lanhu.oss-cn-beijing.aliyuncs.com/pshqp796exqb4nimmbj0ngd47rkslskprw263e126a-695d-429c-b149-cbba3796d8ea'
        },
        {
				  lanhuimage0:
					'https://lanhu.oss-cn-beijing.aliyuncs.com/psdahdhre1ubbx9foh0stgizx4i239pubr083ca21e-3e20-4d1b-be2c-8d35505ea3a0'
        },
        {
				  lanhuimage0:
					'https://lanhu.oss-cn-beijing.aliyuncs.com/pshzr0vd6ulxu11ekn3h8o552qnea7nvuz48cfe1976-1717-42e9-8a16-d32dcf1011f5'
        },
        {
          lanhuimage0:
					  'https://lanhu.oss-cn-beijing.aliyuncs.com/pshqp796exqb4nimmbj0ngd47rkslskprw263e126a-695d-429c-b149-cbba3796d8ea'
				  },
				  {
          lanhuimage0:
					  'https://lanhu.oss-cn-beijing.aliyuncs.com/psdahdhre1ubbx9foh0stgizx4i239pubr083ca21e-3e20-4d1b-be2c-8d35505ea3a0'
				  },
				  {
          lanhuimage0:
					  'https://lanhu.oss-cn-beijing.aliyuncs.com/pshzr0vd6ulxu11ekn3h8o552qnea7nvuz48cfe1976-1717-42e9-8a16-d32dcf1011f5'
				  }
			  ]
    }
  },
  created(){
    vm = this
  },
  mounted() {	
    console.log('Current Swiper instance object',this.$refs.mySwipers.$el.swiper)	
  },
  computed: {
    swiper() {			
      return this.$refs.mySwipers.$el.swiper
    }
	  },
	  components: {		
		  Swiper,
		  SwiperSlide,
		  tabs,
      headss
	  },
	  methods: {
		
    change(index){		
      this.$refs.mySwipers.$el.swiper.slideTo(index, 200, false)
    }
    // tt(index){
    // 	this.swiper.slideTo(index, 0, false)
    // }
  }
}
